function bigclass() {
	var data = {
		"id": "1",
		"title": "华美月饼 &nbsp; &nbsp;金沙系列&nbsp; &nbsp;心意佳礼450g",
		"content": "好吃大苹果",
		"img": "../images/buy_1.jpg",
		"price": 59,
		"imgs": ["../images/buy_1.jpg", "../images/buy_2.jpg", "../images/buy_3.jpg", "../images/buy_4.jpg", "../images/buy_5.jpg", "../images/buy_6.jpg"]
	}

	img1.src = img2.src = data.img;
	//		main.querySelector("h1").innerHTML=data.title;
	//		main.querySelector("span").innerHTML="$"+data.price;
	//		create所有的详情图
	data.imgs.forEach(function(path) {
		child.innerHTML += "<img src='" + path + "'>"
	});
	var imgs = data.imgs

	var imgss = document.querySelectorAll("#boxbig>#div3>#center>#child>img")

	for(var i = 0; i < imgss.length; i++) {
		imgss[i].onclick = function() {
			img1.src = img2.src = this.src;
		}
	}
	//		左按钮
	left.onmousedown = function() {
		var timer = setInterval(function() {
			center.scrollLeft -= 3
		}, 30);
		left.onmouseup = function() {
			clearInterval(timer)
		}
	}
	//		右按钮
	right.onmousedown = function() {
		var timer1 = setInterval(function() {
			center.scrollLeft += 3
		}, 30)
		right.onmouseup = function() {
			clearInterval(timer1)
		}
	}
	div1.onmousemove = function(e) {
		var x = e.clientX - boxbig.offsetLeft - glass.offsetWidth / 2;
		var y = e.clientY - boxbig.offsetTop - glass.offsetHeight / 2;
		if(x < 5) {
			x = 5
		}
		if(x > 145) {
			x = 145
		}
		if(y < 5) {
			y = 5
		}
		if(y > 145) {
			y = 145
		}

		img2.style.left = x * -2 + "px";
		img2.style.top = y * -2 + "px";

		glass.style.left = x + "px";
		glass.style.top = y + "px";

	}

	div1.onmouseover = function() {
		startMove(div2, {
			"opacity": 100
		})
		startMove(glass, {
			"opacity": 70
		})
		//			startMove(div2,{"display":block})
		div2.style.display = "block"
	}

	div1.onmouseout = function() {
		startMove(div2, {
			"opacity": 0
		})
		startMove(glass, {
			"opacity": 0
		})
		//			startMove(div2,{"display":none})
		div2.style.display = "none"
	}
}
//选中规格
function check1() {
	$("#bigclass>#main>.check>.cm1>div").click(function() {
		if($(this).attr("a")) {
			$(this).css({
				"background": ""
			});
			$(this).removeAttr("a");
			$("#bigclass>#main>.check>.cm3>span").remove()
		} else {
			$(this).attr({
				"a": "1"
			})
			$(this).css({
				"background": "url(../images/check.png) no-repeat",
				"background-position": "right bottom"
			});
			$("#bigclass>#main>.check>.cm3").append($('<span></span>').append(" " + $(this).html()));
		}

	})
	//数量加减
	$("#bigclass>#main>.check>.cm2>div>#bot1").click(function() {
		var va = $(this).siblings("#txt1");
		var i = va.val();
		va.val(i * 1 - 1);
		if(i <= 0) {
			va.val(0)
		}
	})
	$("#bigclass>#main>.check>.cm2>div>#bot2").click(function() {
		var va = $(this).siblings("#txt1");
		var i = va.val();
		va.val(i * 1 + 1);
	})
}

//选项卡
function tab1() {
	$("#ul0>li").click(function() {
		var ind = $(this).index();
		$("#ul0>li").removeClass("selected").eq(ind).addClass("selected");
		//$(this).addClass("selected");
		$("#ol0>li").removeClass("checked").eq(ind).addClass("checked");
	})
	$("#ul1>li").click(function() {
		var ind = $(this).index();
		$("#ul1>li").removeClass("selected").eq(ind).addClass("selected");
		//$(this).addClass("selected");
		$("#ol1>li").removeClass("checked").eq(ind).addClass("checked");
	})
}